
#include<WiFi.h>

#define led 2
#define leds digitalWrite(led, !digitalRead(led))
#define led_on digitalWrite(led,HIGH)
#define led_off digitalWrite(led,LOW)
#define button 0
volatile int a ;//申明全局变量
volatile int b ;



class E{
   public:
   E(){
     Serial.print("hello:");
   }
  ~E(){
     Serial.print("Byebye:");
  }



};


void setup() {
  // put your setup code here, to run once:
    pinMode(led, OUTPUT);
    pinMode(button, INPUT);
    Serial.begin(9600);
    
}

void loop() {
  // put your main code here, to run repeatedly:
   E e; 
  if(digitalRead(button)==1){
            
            Serial.print(">");//串口打印不换行
   }


   delay(500);
   if (digitalRead(button)==0)
   {
    delay(130);
      if (digitalRead(button)==0){

          leds;   
          
          Serial.println();//串口打印自动换行，上一行与下一行
          Serial.println(digitalRead(led));      
          Serial.print("a的值为:");
          Serial.print(a++);
          Serial.print("\n");//实现上一行接着，下一行换行
          
      }
          

   }     

       
  }    



